<?php
  require_once('inc_admin.php');
  connect();
  $id = $_POST['id'];
  $data = array(
    'videoname' => trim($_POST['videoname']),
    'tid' => ($_POST['tid']),
    'pic' => ($_POST['pic']),
    'intro' => ($_POST['intro']),
    'uploaddate' => ($_POST['uploaddate']),
    'uploadadmin' => ($_POST['uploadadmin']),
    'hittimes' => ($_POST['hittimes']),
    'downtimes' => ($_POST['downtimes']),
    'address' => ($_POST['address'])
    );

  $result = update('videos',$data,'vid='.$id);
  
  if(!$result)
  {
		echo "更新失败！<br/>";
		echo "<a href='videoEditForm.php?id={$id}'>返回</a>";	  
  }
  else
  {		
		redirect('videoList.php', '更新成功！');
  }	   
 ?>